package com.cloudkinto.service.finance.vo.exportVo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * Author Administrator
 *
 * @Des
 * @Version
 * @Date 2020/11/18
 */
@Data
public class OrderBackVo implements Serializable {
    @Excel(name = "所属店铺", width = 20)
    private String shopName;

    @Excel(name = "收货仓库", width = 20)
    private String storageName;

    @Excel(name = "运输费", width = 20, type = 10)
    private Double shipFee;

    @Excel(name = "操作费", width = 20, type = 10)
    private Double operateFee;

    @Excel(name = "仓储费", width = 20, type = 10)
    private Double storageFee;

    @Excel(name = "废弃费", width = 20, type = 10)
    private Double dropFee;

    @Excel(name = "税费", width = 20, type = 10)
    private Double taxFee;

    @Excel(name = "订单号", width = 20)
    private String orderOutputNumber;

    @Excel(name = "运单号", width = 20)
    private String trackNumber;
    @Excel(name = "快递公司", width = 20)
    private String trackNanme;
    @Excel(name = "审核状态", width = 20)
    private String status;
    @Excel(name = "处理结果", width = 20)
    private String result;
    @Excel(name = "SKU", width = 20)
    private String sku;
    @Excel(name = "退货数量", type = 10)
    private int skuCount;


    public Double getShipFee() {
        if (shipFee == null) {
            return 0d;
        }
        return new BigDecimal(shipFee).setScale(2, RoundingMode.HALF_UP).doubleValue();
    }

    public Double getOperateFee() {
        if (operateFee == null) {
            return 0d;
        }
        return new BigDecimal(operateFee).setScale(2, RoundingMode.HALF_UP).doubleValue();
    }

    public Double getDropFee() {
        if (dropFee == null) {
            return 0d;
        }
        return new BigDecimal(dropFee).setScale(2, RoundingMode.HALF_UP).doubleValue();
    }

    public Double getTaxFee() {
        if (taxFee == null) {
            return 0d;
        }
        return new BigDecimal(taxFee).setScale(2, RoundingMode.HALF_UP).doubleValue();
    }
}
